﻿<navigation:Page x:Class="XamlPhysics.Samples.SampleMenu" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="SampleMenu Page">
    <Grid x:Name="LayoutRoot">
        <ItemsControl x:Name="UxSamples" BorderThickness="0"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
            ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Center" >
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.Resources>
                <Style x:Key="MainMenuButton" TargetType="ButtonBase">
                    <Setter Property="Cursor" Value="Hand" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid>
                                    <ContentPresenter x:Name="Content" Margin="0,2,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
                <Style x:Key="MainMenuText" TargetType="TextBlock">
                    <Setter Property="Width" Value="400" />
                    <Setter Property="FontFamily" Value="Verdana" />
                    <Setter Property="FontSize" Value="64" />
                </Style>
            </ItemsControl.Resources>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <HyperlinkButton Style="{StaticResource MainMenuButton}" NavigateUri="{Binding Path}" TargetName="UxSampleViewer">
                        <TextBlock Style="{StaticResource MainMenuText}" Text="{Binding Path=Name}" />
                    </HyperlinkButton>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        
    </Grid>
</navigation:Page>